package com.bit.aop.proxy;
//中介
public class HouseProxy implements HouseSubject{
    //进行让中介代理房主进行卖房；
    private HouseSubject realHouseSubject;
    public HouseProxy(HouseSubject realHouseSubject){
        this.realHouseSubject=realHouseSubject;
    }

    @Override
    public void selectHouse() {
        System.out.println("我是中介，我帮房东开始进行代理");
        realHouseSubject.selectHouse();//房东卖房；
        System.out.println("我是中介，我帮房东结束代理");
    }

    @Override
    public void rentHouse() {
        System.out.println("我是中介，我帮房东开始进行代理");
        realHouseSubject.rentHouse();
        System.out.println("我是中介，我帮房东结束代理");
    }
}
